/**
 * @Description 
 * @Author Daniel
 * @Date 2014-12-1 下午01:37:40
 * @Version V1.0
 * 
 */
package com.ttbj.core.session;

import javax.servlet.http.HttpServletRequest;

/**
 * MMSession接口
 * 
 * 与HttpSession一样的setAttribute、getAttribute、removeAttribute等方法
 * 
 * @Author Daniel
 * @Date 2014-12-1 下午01:37:40
 * @Version 1.0
 */

public interface CommonSession {

	/**
	 * 设置session的值
	 * 
	 * @param request
	 * @param key
	 * @param obj
	 * @Author Daniel
	 * @Date 2014-12-1 下午01:40:26
	 * @Version V1.0
	 * 
	 */
	public void setAttribute(HttpServletRequest request, String key, Object obj);

	/**
	 * 设置session的值 ，超时时间
	 * 
	 * @param key
	 * @param obj
	 * @param liveTime
	 * @Author Daniel
	 * @Date 2014-12-1 下午01:40:44
	 * @Version V1.0
	 * 
	 */
	public void setAttribute(HttpServletRequest request, String key,
			Object obj, long liveTime);

	/**
	 * 获取session的值
	 * 
	 * @param key
	 * @return
	 * @Author Daniel
	 * @Date 2014-12-1 下午01:41:16
	 * @Version V1.0
	 * 
	 */
	public Object getAttribute(HttpServletRequest request, String key);

	/**
	 * 删除Session值
	 * 
	 * @param request
	 * @param key
	 * @Author Daniel
	 * @Date 2014-12-1 下午01:41:42
	 * @Version V1.0
	 * 
	 */
	public void removeAttribute(HttpServletRequest request, String key);

}
